The present invention relates to a virtual machine system controller, and more particularly to a virtual machine system controller which allows an operation of a virtual machine having a different architecture than that of a base machine.
A virtual machine system is disclosed in Japanese Patent Application Laid-Open No. 57-212680 which was filed claiming a priority of June 15, 1981 based on U.S. patent application Ser. No. 273,532, now U.S. Pat. No. 4,456,954.
As the field of application of digital computers has expanded, an addressing system which has fever restrictions on the capacity of a real memory, that is, a virtual storage system has been used. As an extension of the virtual storage system, a system which allows simultaneous use of one bare machine by a number of users, that is, a virtual machine system has been used. In the virtual machine system, a number of operating systems (OS's) apparently simultaneously run on one bare machine (BM) so that all resources including a main memory and input/output devices as well as a central processing unit are shared by the users.
In the BM, two operation modes, a privileged mode and a non-privileged mode are used. In a non-virtual machine, the privileged mode is assigned to the operation mode of the OS but the privileged mode in the virtual machine system (VMS) is assigned to an operation mode of a special control program and the OS is operated in the non-privileged mode. This special control program is referred to as a virtual machine monitor (VMM) or a virtual machine control program (VMCP).
FIG. 1 is a conceptual view of an ordinary VMS. A BM 501 provides to a software with a base machine interface 503 which can handle a privileged or non-privileged mode execution request. Accordingly, a VMM 502 operates by utilizing the base machine interface 503 provided by the BM 501. The VMM 502 provides additional virtual machine interfaces 508 and 508' to enable operations of OS's 506 and 507 which are operated in respective virtual machines (VM's) 504 and 505. While only two VM's are shown in FIG. 1, it should be understood that a larger number of VM's are usually included.
The OS's 506 and 507 are operated using the virtual machine interfaces 508 and 508' provided by the VM's 504 and 505, but when looked at from the user programs, it appears as if they operate on the BM 501.
The OS's 506 and 507 further provide extended machine interfaces 513 and 514 to user programs (UP's) 515-518. Extended machines (EM's) 509-512 have functions to execute supervisor call interuption from the user programs under certain function requests such as under certain OS, in the OS's 506 and 507 and functions to execute machine instructions in the non-privileged mode. Accordingly, if the OS 506 and the OS 507 are different from each other, the EM 509 and the EM 511 executed for different OS's 506 and 507 naturally have different functions.
In the virtual machine system (VMS) having the operation concept described above, a plurality of different OS's apparently may be simultaneously run on the BM. Accordingly, the following advantages are offered. (i) Debugging or testing of a newly developed system is attained without stopping the service to a running system. (ii) Since the plurality of different OS's can run on one BM, the cost of the real hardware is reduced and the utilization efficiency of hardware resources is improved.
In the VMS concept shown in FIG. 1, since the virtual machine interface 508 provided by the VMM 502 is functionally homogeneous to the base machine interface 503 provided by the BM 501, the OS which runs on the BM 501 can also run on the VM 504 and the VM 505. Accordingly, the VM is basically equivalent to the BM and has no functionally distinguishable difference. The VMM 502 does not interpret or execute the programs of the OS or the UP instruction by instruction but allows direct execution of the non-privileged instruction in the program by the BM 501. However, the VMM 502 detects the privileged instruction, and interpretes and executes, that is, simulates the detected instruction to assume the entire integrity of the system content without destroying the hardware environment of the VMS. After the interpretation and the execution, the VMM 502 returns the control to the program being executed. Thus, the non-privileged instruction is directly executed without the intervention of the VMM 502 and only the privileged instruction which requires the interpretation and the execution by the VMM 502 is intervened by the VMM 502.
A method in which the VMM 502 provides the service of the BM 501 to the VM's 504 and 505, that is, a dispatching method is similar to that in a conventional multiprogram control system. That is, the hardware resources of the BM 501 are allotted to the VM's in a time-division and space-division fashion. The VMM 502 manages the hardware resources of the BM 501.
FIG. 2 illustrates a space-division management method for a main memory of the VMS. The VMM 502 manages the hardware resources including the main memory and the input/output devices in a space-division fashion and manages a control register (CR) 521, a general register (GR) 522, a floating point register (FPR) 523, a program status word (PSW) 524 and a timer 525 in a time-division fashion as the machine instructions are executed. That is, when the VM is serviced by the BM 501, those elements are transferred to the real hardware in a time-division fashion.
As shown in FIG. 2, control blocks 527 for the respective VM's are formed in a main memory 526, that is, a first level storage 526. Contents of a virtual control register (VCR) 528, a virtual general register (VGR), a virtual floating point register (VFPR) 529, a virtual program status word (VPSW) 530, and a virtual timer 540 in the control block 527 are transferred to the CR 521, GR 522, the FPR 523, the PSW 524 and the timer 525 which are the real hardware resources, when the associated VM is serviced by the BM 501.
As is well known, a preparation job for the VMM 502 to service the VM 504 by the BM 501 is called a dispatching process. One of the VM's is selected by the dispatching process so that an operation environment is established.
On the other hand, the space-division management of the main memory is done by a well-known virtual storage control system. The VMM 502 provides virtual main memory spaces 531, that is, second-level storages, one for each VM. Thus, the VMM 502 provides virtualized second level storages. The second-level storages 531 are managed by space translation tables (which are also called mapping tables or address translation tables), that is, real segment tables (RST) 532 and real page tables (RPT) 533. When the OS 506 which runs on the VM 504 uses the virtual storage system, the OS 506 forms a virtual segment table (VST) 534 and a virtual page table (VPT) 535 in the second-level storage 531. Accordingly, the user program operates in a third-level storage 536 under the control of the VST 534 and the VPT 535. The VMM 502 directly manages the storage 526 by using the RST 532 and the RPT 533. The space translation from the third-level storage 536 to the first-level storage 526 requires two translations, one by the VST 534 and the VPT 535 and the other by the RST 532 and the RPT 533. As taught by the above-mentioned Japanese Patent Application, the translations can be done in one step by merging the RST 532 and the RPT 533, and the VST 534 and the VPT 535, respectively, so that the VMM 502 forms a shadow segment table (SST) 537 and a shadow page table (SPT) 538.
To manage the input/output devices, tables for device address versus real device addresses are provided one for each VM and managed in the space-division fashion.
The prior art virtual machine system is configured as shown in FIG. 2. As is apparent from the above description, in the VMS in which the virtual hardware provided by the VM 504 generated under the VMM 502 is homogeneous to the hardware of the BM 501, the above advantages, that is, the debugging which is in parallel with the service and the execution of the plurality of OS's are offered, but different types of hardwares between the VM's are not attained. Referring to FIG. 1, the VMM 502 cannot provide different virtual machine interfaces to the VM 504 and the VM 505. The virtual machine interface of the VM 504 is limited to that which is homogeneous to the base machine interface of the BM 501, and the virtual machine interface of the VM 505 is limited to that which is homogeneous to the base machine interface of the BM 501. Thus, the VM 504 and the VM 505 cannot have the virtual machine interface which is totally or partially non-homogeneous to the base machine interface of the BM 501. Thus, the prior art VMS cannot execute the OS which runs on a machine which is non-homogeneous to the BM.
Various improvements of the VMS have been proposed in the past, however, such improvements were directed to improve the run performance of the machine which is homogeneous to the BM. (See for example, Japanese Patent Application Laid-Open Nos. 55-42326, 55-113182 and 57-212680).
However, as the VMS has been used in various fields, the demand increases to run a program or an OS of a minicomputer or a microcomputer having different privileged instruction and PSW format than those of a large scale computer, in one VMS.